import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.net.Socket;
import java.util.ArrayList;

public class TestingClient {  
	public static void main(String args[]){  
		try{  
			/*Socket s = new Socket("localhost",2002);
			OutputStream os = s.getOutputStream();  
			PrintWriter sendObject = new PrintWriter(os, true);
			sendObject.println("300");
			ObjectOutputStream oos = new ObjectOutputStream(os);  
			//testobject to = new testobject(1,"object from client");
			Maze game = new Maze(3,10);
			game.printMaze();
			oos.writeObject(game);  
			//oos.writeObject(new String("another object from the client"));  
			oos.close();  
			os.close();  
			s.close();*/
			
			ClientConnection.openConnection("localhost", 2002);
			ClientConnection.send("300");
			Maze game = new Maze(3,10);
			ArrayList<Player> l =  new ArrayList<Player>();
			for (int i=0;i<10;i++)
			{
				Player p = new Player("localhost",i+1000,i+"",null);
				l.add(p);
			}
			game.setPlayers(l);
			game.printMaze();
			ClientConnection.openConnection("localhost", 2002);
			ClientConnection.sendGameState(game);
			
		}catch(Exception e){System.out.println(e);}  
	}  
}
